//
//  ViewControllerTwo.m
//  testRN
//
//  Created by Juvid on 2017/3/15.
//  Copyright © 2017年 Facebook. All rights reserved.
//

#import "ViewControllerTwo.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
@interface ViewControllerTwo ()

@end

@implementation ViewControllerTwo

- (void)viewDidLoad {
    [super viewDidLoad];
   self.title=@"Two";
   self.edgesForExtendedLayout=UIRectEdgeNone;
  NSURL *jsCodeLocation;
//  =[NSURL URLWithString:@"http://192.168.8.22:8081/index.ios.bundle?platform=ios&dev=true&minify=false"];
  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"juvid" fallbackResource:@"juvid"];
//  jsCodeLocation= [[NSBundle mainBundle] URLForResource:@"juvid" withExtension:@"jsbundle"];
  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                      moduleName:@"testOne"
                                               initialProperties:nil
                                                   launchOptions:nil];
  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
  self.view=rootView;
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
